# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=smbcrunch
pkgver=12.313400e
pkgrel=5
pkgdesc='3 tools that work together to simplify reconnaissance of Windows File Shares.'
groups=('blackarch' 'blackarch-recon' 'blackarch-scanner')
arch=('any')
url='https://github.com/Raikia/SMBCrunch'
license=('GPL3')
depends=('perl')
makedepends=('git')
source=("$pkgname::git+https://github.com/Raikia/SMBCrunch.git")
sha512sums=('SKIP')

pkgver() {
  cd $pkgname

  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

package() {
  cd $pkgname

  install -Dm 755 SMBGrab.pl "$pkgdir/usr/bin/smbgrab"
  install -Dm 755 SMBHunt.pl "$pkgdir/usr/bin/smbhunt"
  install -Dm 755 SMBList.pl "$pkgdir/usr/bin/smblist"
  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" README.md
  install -Dm 644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

